{% extends 'base.html' %}
{% block title %}管理登录{% endblock %}
{% block main_content %}
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <div class="panel panel-default">

                <div class="panel-heading">
                    <h4>管理员登录</h4>
                </div>

                <div class="panel-body">
                    <form action="#" class="form-hrizontal" method="post">
                        <div class="col-md-10 col-md-offset-1">
{#                        取得显示flash信息 #}
                            {% with messages = get_flashed_messages() %}
                                {% if messages %}
                                    {% for msg in messages %}
                                        <div class="alert alert-warning col-md-offset-2">
                                            <a href="#" class="close" data-dismiss="alert">&times;</a>
                                            {{ msg }}
                                        </div>
                                    {% endfor %}
                                {% endif %}
                            {% endwith %}

                            <div class="form-group">
                                <div class="row">
                                    <label for="username" class="col-md-2">用户名</label>
                                    <div class="col-md-10">
                                        <input type="text" class="form-control" name="username" id="username"
                                               placeholder="{{ request.cookies.get('username') if request.cookies.get('username') else '输入用户名'}}">
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="row">
                                    <label for="username" class="col-md-2">密码</label>
                                    <div class="col-md-10">
                                        <input type="password" class="form-control " name="password" id="password" placeholder="请输入密码">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="row">
                                    <div class="col-md-6 col-md-offset-2">
                                        <input type="checkbox"  name="rpw" id="rpw">
                                        <label for="tmm"> 记住密码</label>
                                    </div>
                                    <div class="col-md-4 ">
                                        <label for="tmm"> 验证码</label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group ">
                                <div class="col-md-10 col-md-offset-3">
                                    <input class="btn btn-primary" type="submit" value="登录">
                                </div>
                            </div>

                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>
{% endblock %}